package com.example.mapper;

import com.example.domain.Annualoutput;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface AnnualoutputMapper {

    @Select("select * from wmy.annualoutput")
    List<Annualoutput> getAll();

    @Select("select * from wmy.annualoutput where annualoutput_id = #{annualoutputId}")
    Annualoutput getById(Integer annualoutputId);

    @Insert("insert into wmy.annualoutput (year, annualoutput) values (#{year}, #{annualoutput})")
    boolean add(Annualoutput annualoutput);

    @Update("update wmy.annualoutput set year=#{year},annualoutput=#{annualoutput} where annualoutput_id = #{annualoutputId}")
    boolean update(Annualoutput annualoutput);

    @Delete("delete from wmy.annualoutput where annualoutput_id = #{annualoutputId}")
    boolean delete(Integer annualoutputId);
}
